//
//  OEQrCodeViewController.m
//  OneEightyNine
//
//  Created by Mac on 2019/3/5.
//  Copyright © 2019 stoneobs. All rights reserved.
//

#import "OEQrCodeViewController.h"

@interface OEQrCodeViewController ()

@end

@implementation OEQrCodeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = OESTRING(@"QR CODE");
    [self configSubView];
    // Do any additional setup after loading the view.
}

#pragma mark --subView
- (void)configSubView{
    UIView * header = [[UIView alloc] initWithFrame:UIScreenFrame];
    
    UIImageView * imageView = [[UIImageView alloc] initWithFrame:CGRectMake(40, 60, UIScreenWidth - 80, UIScreenWidth - 80)];
    imageView.image = [UIImage imageNamed:@""];
    [header addSubview:imageView];
    [OEUserDataController sendQrCodeMoneyRequest:^(NSString * _Nonnull qrcode) {
        [imageView sd_setImageWithURL:[NSURL URLWithString:qrcode]];
    }];
    
    STLabel * titleLable = [[STLabel alloc] initWithFrame:CGRectMake(10, imageView.bottom, UIScreenWidth - 40, 44)
                                                     text:OESTRING(@"Sweep two-dimensional code")
                                                textColor:SecendTextColor
                                                     font:15
                                              isSizetoFit:NO
                                            textAlignment:NSTextAlignmentCenter];
    [header addSubview:titleLable];
    header.height = titleLable.bottom;
    self.tableView.tableHeaderView = header;
}

@end
